|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcontrol.Simulation
public class Simulation
This Class contains algorithms useful for simulation
| Field Summary | |
|---|---|
private Community |
community
|
private java.util.Set<SimulatedBy> |
pairs
|
private Service |
target
|
| Constructor Summary | |
|---|---|
protected |
Simulation(Service target,
Community community)
|
| Method Summary | |
|---|---|
private boolean |
checkSimulationOfNextState(CState cs,
Action as,
State nextTState)
checks if there is a state of the community going with the selected action to another state that is in simulation with the next state of the target |
private boolean |
checkSimulationSet()
controls if all records in simulation set are in simulation and if one of them isn't it is deleted |
protected void |
compositionViaSimulation()
creates the final simulation set containing all pairs of states which are in simulation |
protected boolean |
contains(SimulatedBy sb)
checks if the given pair of states is present in the simulation set |
private void |
createSimulationSet()
creates an initial simulation set containing: - all pairs of final target state and final community state - all pairs of not final target state and community state |
protected java.util.Iterator<SimulatedBy> |
getSimulationSet()
gets an iterator on the element of the simulation set |
protected boolean |
isEmpty()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.Set<SimulatedBy> pairs
private Service target
private Community community
| Constructor Detail |
|---|
protected Simulation(Service target,
Community community)
| Method Detail |
|---|
protected void compositionViaSimulation()
private void createSimulationSet()
private boolean checkSimulationSet()
private boolean checkSimulationOfNextState(CState cs,
Action as,
State nextTState)
cs - - list of states which represent a community stateas - - actionnextTState - - next target state
protected boolean contains(SimulatedBy sb)
sb - - element to check
protected java.util.Iterator<SimulatedBy> getSimulationSet()
protected boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||